public class Text {
    public static void eat(Animal animal){
        animal.eat();
    }
    public static void main(String[] args){
        Cat cat=new Cat("朵朵",10);
        Dog dog=new Dog("花花",19);
        cat.eat();
        dog.eat();
    }
}
